package y24.m2;

import java.util.Arrays;

public class Test4 {
    static class Solution {
        public int[] plusOne(int[] digits) {
            int end = digits.length - 1;
            if (digits[end] == 9){
                if (end == 0){
                    int[] arr = {1,0};
                    return arr;
                }
            }
            return digits;
        }
    }

    public static void main(String[] args) {
        int[] arr = {1,2,3};
        System.out.println(Arrays.toString(new Solution().plusOne(arr)));
    }
}
